package cn.getech.data.development.mapper.dataMap;

import cn.getech.data.development.entity.dataMap.DataApplication;
import cn.getech.data.development.entity.dataMap.DataApplicationExample;
import cn.getech.data.development.model.dto.ApplyUserListDTO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

@Mapper
public interface DataApplicationMapper extends BaseMapper<DataApplication> {
    int insertSelective(DataApplication record);

    List<DataApplication> selectByExample(DataApplicationExample example);

    DataApplication selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") DataApplication record, @Param("example") DataApplicationExample example);

    int updateByPrimaryKeySelective(DataApplication record);

    int updateBatch(List<DataApplication> list);

    IPage<DataApplication> approvePage(Page<DataApplication> page, @Param("params") Map<String, Object> params);

    List<String> offProjectList(@Param("params") Map<String, Object> params);

    List<DataApplication> selectAll();

    List<String> realProjectList(@Param("params") Map<String, Object> params );

    Set<ApplyUserListDTO> applyUserList(@Param("params") Map<String, Object> params);

    Set<ApplyUserListDTO> rollbackApplyUserList(@Param("params") Map<String, Object> params);

    List<DataApplication> selectListByTableId(@Param("tableId") Integer tableId, @Param("status")Integer status);
}